<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<h:form id="participantSearch">
	<rich:collapsiblePanel expanded="true">
	<f:facet name="header">suchen . . .</f:facet>
	<table class="searchTable">
		<tr>
			<td>Name</td>
			<td><h:inputText value="#{ParticipantOverviewViewBean.name}" /></td>
		</tr>
		<tr>
			<td colspan="2"><hr/></td>
		</tr>
		<tr>
			<td colspan="2"><center><a4j:commandButton id="searchButton" action="#{ParticipantOverviewViewBean.refreshFilteredView()}" value="suchen" execute="participantSearch" render="participant_table datascrolleroben_participant datascrollerunten_participant" onbegin="#{rich:component('Loadingpopup')}.show();" oncomplete="#{rich:component('Loadingpopup')}.hide();"/></center></td>
		</tr>
	</table>
	</rich:collapsiblePanel>
	</h:form>
	<center><rich:dataScroller id="datascrolleroben_participant" for="participant_table" maxPages="10" stepControls="auto" render="datascrollerunten_participant"/></center>
	<h:form id="participantTableForm">
	
	<a4j:jsFunction  name="rowupdate" action="#{ParticipantOverviewViewBean.innerCompShow()}" actionListener="#{ParticipantOverviewViewBean.selectionListener}" execute="participantTableForm" render="participantDetail">
    </a4j:jsFunction>
	<rich:extendedDataTable value="#{ParticipantOverviewViewBean.participants}" binding="#{ParticipantOverviewViewBean.dataTable}"
            var="participants" id="participant_table" frozenColumns="4" rows="10"
             selectionMode="single" styleClass="questionOverviewTable"
            noDataLabel="keine Teilnehmer verfügbar" keepSaved="false" onready="InvokeClick('searchButton')"
            rowClasses="rowstyle1,rowstyle2" selection="#{ParticipantOverviewViewBean.selection}" onrowdblclick="rowupdate()">

            <f:facet name="header">
                <h:outputText value="Teilnehmer" />
            </f:facet>
            <rich:column width="50px">
                <f:facet name="header">
                    <h:outputText value="ID" />
                </f:facet>
			<h:outputText value="#{participants.id}" />
		</rich:column>
            <rich:column width="550px">
                <f:facet name="header">
                    <h:outputText value="Name" />
                </f:facet>
                <h:outputText value="#{participants.name}" />
            </rich:column>
        </rich:extendedDataTable>
        </h:form>
		<center><rich:dataScroller id="datascrollerunten_participant" for="participant_table" maxPages="10" stepControls="auto" render="datascrolleroben_participant"/></center>														
		
		
		<ui:include src="ChangeParticipantinnerComp.xhtml"/>
		
</ui:composition>
